package com.horay.springbootdemo.caffeine.redis.index.controller;

import com.horay.springbootdemo.caffeine.redis.index.service.IndexService;
import com.horay.springbootdemo.common.result.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页控制器
 *
 * @author heyingcheng
 * @date 2019/9/30 17:33
 */
@RestController
@RequestMapping("cache")
public class IndexController {

    @Autowired
    private IndexService indexService;

    @GetMapping("index")
    public ResultBody<String> index() {
        return ResultBody.success(indexService.getIndexInfo());
    }

}
